<link type="text/css" rel="stylesheet" href="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder');?>styles/chosen.css" />
<div class="cleaner_h10"></div>
		<?php echo form_open('persediaancontroller/tambah_faktur', 'name="frm"'); ?>
			<table width="90%" cellpadding="3" cellspacing="0" style=" border-collapse: collapse;" class="record">
				<tr><td width="110"><strong>Kode Faktur</strong></td><td width="20" align="center"><strong>:</strong></td><td><input type="text" value="<?php echo $nofaktur; ?>" class="input-read-only" readonly=
				"true" style="width:280px;" name="kode_faktur" /></td>
				<td width="100"><strong>Nomor PO</strong></td><td align="center"><strong>:</strong></td><td>
				<select data-placeholder="Cari nomor po..." class="chzn-select" style="width:280px;" tabindex="2" name="kode_pesanan" id="kode_pesanan">
          		<option value=""></option> 
					<?php
						foreach($nopo as $dp)
						{
					?>
						<option value="<?php echo $dp->NoPo; ?>"><?php echo $dp->NoPo; ?></option>
					<?php
						}
					?>
				</select></td></tr>
				
			</table>
			<div id="data_pesanan"></div>
            <script src="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder'); ?>scripts/jquery-1.9.0.js" type="text/javascript"></script>
 <script src="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder'); ?>scripts/jquery-migrate-1.0.0.js" type="text/javascript"></script>
			<script src="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder'); ?>scripts/chosen.jquery.js" type="text/javascript"></script>
			<script type="text/javascript"> 
					$(".chzn-select").chosen().change(function(){
						var kode_pesanan = $("#kode_pesanan").val(); 
						$.ajax({ 
							url: "<?php echo site_url('persediaancontroller/ambil_data_pesanan_ajax'); ?>", 
							data: "kode_pesanan="+kode_pesanan, 
							cache: false, 
							success: function(msg){ 
								$("#data_pesanan").html(msg); 
							} 
						})
					});
			</script>
		<?php echo form_close(); ?>